Can someone please tell me how to modify the word.dxl file such that it turns OFF spelling, grammar, and pagination before starting to export? Please include some error checking to see if word will oblige.
llandale - Tue Mar 02 17:04:17 EST 2010 |
Re: word.dxl export no spelling no pagination |
Re: word.dxl export no spelling no pagination code void wordDisableCheckAsYouType(OleAutoObj foo) { // Turn off screen updating checkRes(olePut(foo, cPropertyScreenUpdating, false)) // Get the Options Object OleAutoObj objOptions = null checkRes(oleGet(foo, cPropertyOptions, objOptions)) if (null(objOptions)){return} // Get the current settings for the user checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck)) checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck)) // Now turn off both checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false)) checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false)) // Also turn off Auto Pagination checkRes(olePut(objOptions, cPropertyPagination, false)) } [/code] |
Re: word.dxl export no spelling no pagination pete.kowalski - Wed Mar 03 10:27:58 EST 2010
Ignore my last post
const string cPropertyCheckSpellingAsYouType = "CheckSpellingAsYouType"
const string cPropertyCheckGrammarAsYouType = "CheckGrammarAsYouType"
const string cPropertyPagination = "Pagination"
void wordDisableCheckAsYouType(OleAutoObj foo)
{
// Turn off screen updating
checkRes(olePut(foo, cPropertyScreenUpdating, false))
// Get the Options Object
leAutoObj objOptions = null
checkRes(oleGet(foo, cPropertyOptions, objOptions))
if (null(objOptions)){return}
// Get the current settings for the user
checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))
// Now turn off both
checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false)) // turn off spelling
checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false)) // turn off grammar checking
// Also turn off Auto Pagination
checkRes(olePut(objOptions, cPropertyPagination, false)) // turn off pagination
}
|
Re: word.dxl export no spelling no pagination pete.kowalski - Wed Mar 03 10:34:08 EST 2010
Ignore my last post
const string cPropertyCheckSpellingAsYouType = "CheckSpellingAsYouType"
const string cPropertyCheckGrammarAsYouType = "CheckGrammarAsYouType"
const string cPropertyPagination = "Pagination"
void wordDisableCheckAsYouType(OleAutoObj foo)
{
// Turn off screen updating
checkRes(olePut(foo, cPropertyScreenUpdating, false))
// Get the Options Object
leAutoObj objOptions = null
checkRes(oleGet(foo, cPropertyOptions, objOptions))
if (null(objOptions)){return}
// Get the current settings for the user
checkRes(oleGet(objOptions, cPropertyCheckSpellingAsYouType, wordDoAutoSpellCheck))
checkRes(oleGet(objOptions, cPropertyCheckGrammarAsYouType, wordDoAutoGrammarCheck))
// Now turn off both
checkRes(olePut(objOptions, cPropertyCheckSpellingAsYouType, false)) // turn off spelling
checkRes(olePut(objOptions, cPropertyCheckGrammarAsYouType, false)) // turn off grammar checking
// Also turn off Auto Pagination
checkRes(olePut(objOptions, cPropertyPagination, false)) // turn off pagination
}
cPropertyOptions wordDoAutoSpellCheck wordDoAutoGrammarCheck The call would go in function userExportCode(), after checking for objWord == null? Forgive ignorance, but I don't see how you are getting the current settings.
|